A semiconductor device in which photodiodes and thin film transistors are formed on the same substrate has been known since before. In such a semiconductor device, the thin film transistors are constituted of some of semiconductor layers out of a plurality of island shaped semiconductor layers formed on the substrate, and the photodiodes are constituted of the remaining semiconductor layers that respectively have light-shielding layers provided between the semiconductor layers and the substrate, as disclosed in Japanese Patent Application Laid-Open Publication No. 2008-300630, for example.